package com.xuelang.pipeline.artifact.app.resource.converter;

import com.xuelang.pipeline.artifact.client.resource.dto.ArtifactUserDTO;
import com.xuelang.pipeline.artifact.domain.resource.ArtifactUser;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 仓库用户DTO与仓库用户实体转换器
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface ArtifactUserDTOToArtifactUserConverter {
    ArtifactUserDTOToArtifactUserConverter INSTANCE = Mappers.getMapper(ArtifactUserDTOToArtifactUserConverter.class);

    /**
     * ArtifactUser转化为ArtifactUserDTO
     * @param artifactUser
     * @return
     */
    ArtifactUserDTO artifactUserToArtifactUserDTO(ArtifactUser artifactUser);

    /**
     * ArtifactUserDTO转化为ArtifactUser
     * @param artifactUserDTO
     * @return
     */
    ArtifactUser artifactUserDTOToArtifactUser(ArtifactUserDTO artifactUserDTO);
}
